<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
      #yu {
        background: green;
        height: 50px;
        width: 50px;
        position: absolute;
        left: 0px;
        top: 0px;
        animation-name: W;
        animation-duration: 3s;
        animation-timing-function: linear;
        animation-direction: alternate;
        animation-iteration-count: infinite;
      }
      @keyframes W {
        0% {
          left: 0px;
          top: 0px;
        }
        25% {
          left: 195px;
          top: 450px;
        }
        50% {
          left: 445px;
          top: 0px;
        }
        75% {
          left: 695px;
          top: 450px;
        }
        100% {
          left: 945px;
          top: 0px;
        }
      }
    </style>
  </head>
  <body>
    <div
      style="
        border: 1px solid blue;
        height: 500px;
        width: 1000px;
        background: pink;
        position: absolute;
        left: 24%;
        top: 0px;">
      <div id="yu">
        <div style="color: purple">一只鱼</div>
      </div>
    </div>
  </body>
</html>
